package com.wc.blue_bridge_test.base.T64;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/12/28 1:16
 * @description
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        String[] ss = new String[n];
        for (int i = 0; i < n; i++) {
            ss[i] = sc.nextLine();
        }
        Arrays.sort(ss);
        String lenS = ss[n / 2];
        int len = lenS.length();
        StringBuffer ans = new StringBuffer();
        for (int i = 0; i < len; i += 2) {
            char c = lenS.charAt(i);
            if (c == '1') {
                ans.append(' ');
                ans.append(i / 2 + 1);
            }
        }
        ans.replace(0, 1, "");
        System.out.println(ans);
    }
}
